<%@ page language="java"  pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%>
<%@taglib uri="/WEB-INF/wm.tld" prefix="wm"%>
<!DOCTYPE html>
<html lang="zh">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>个人中心-沈阳外卖网</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- Bootstrap -->
<link href="publicui/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" />
<!--[if lt IE 9]>
  <script src="public/js/html5shiv.js"></script>
<![endif]-->
<!-- application  -->
<link href="css/head.css" rel="stylesheet" />
<link href="css/foot.css" rel="stylesheet" />
<link href="css/profile.css" rel="stylesheet" />

</head>

<body >

<!-----nav-->
    <s:action name="top" executeResult="true"></s:action>
<!---/nav   --> 

<!---/body   -->
<div class="content" > 
<!--   content  -->
	<div class="wash-paper clearfix" id="profile" >
		<s:include value="left.action?urlType=1"></s:include>
		<div class="main-content">
			<div class="content-header">
				<h2>
					个人中心
				</h2>
			</div>

			<div class="content-inner profile-index">

				<div class="account-status clearfix">
					<div class="clearfix">
						<div class="col-left">
						
							<div class="avatar">
								<!-- <a href="/profile/set_avatar">上传<br />头像</a>-->
							</div>
							
							<div class="safety-level-wrapper">
								<h5>
									<s:property value="user.userName"/>
								</h5>
								<p>
									<span class="text-gray">安全等级：</span>
									<s:if test="pwdshow==0">
									<a class="user-safety-level low" href="/profile/security"> 低 </a>
									</s:if>
									<s:if test="pwdshow==1">
									<a class="user-safety-level middle" href="/profile/security"> 中 </a>
									</s:if>
									<s:if test="pwdshow==2">
									<a class="user-safety-level full" href="/profile/security"> 高 </a>
									</s:if>
								</p>
							</div>
						</div>

					</div>
					<ul class="related-info clearfix">
					<!-- 
						<li>
							<i class="icon-point"></i>积分： 0点
							<a href="/gift">兑换礼品</a>
						</li>
						<li>
							<i class="icon-order"></i>完成订单：
							<a href="/profile/order/filter/last-month">0</a>张（一个月内完成）
						</li> -->
						<li>
							<i class="icon-star"></i>收藏：
							<a href="collect.action"><s:property value="collectSize"/></a>家餐厅
							<!-- <a href="/profile/favor_food">5</a>份美食 -->
						</li>
					</ul>
				</div>

				<div class="latest-orders tab_wrapper">
					<ul class="tab_header">
						<li id="li" class="active" onclick="show(0);">
							今日订单
						</li>
						<li id="li1" onclick="show(1);" style="display:none;">
							最近一周订单
						</li>
					</ul>

					<div class="tab_body">
						<div class="food-orders" id="day">
						<s:if test="pageList==null||pageList.objectList==null||pageList.objectList.size==0">
							<p class="empty">
								你还没有下过单哦，现在就去订餐吧～
							</p>
						</s:if>
						<s:else>
						<s:iterator id="l" value="%{pageList.ObjectList}">
             	 <span id="ref_time" ref_time='1364954294000'></span>
                     <div class="order-block">
            
                     <div class="order-header">
                      <div class="status-wrapper">
                        <div class="status orange">
                        <!-- 
                          <s:if test="#l.state==0">下单</s:if>
                          <s:if test="#l.state==1">饭店接单</s:if>
                          <s:if test="#l.state==2">送出</s:if>
                          <s:if test="#l.state==3">交易成功</s:if>
                          @ -->
                          <a href="/hd-jznrmdw" target="_blank"><s:property value="#l.resName"/></a>
                        </div>
            
            <!-- 
                        <div class="order-actions">
                                      <a class="btn-cancel cancel_order_by_phone" order_sn="12428409764321312" rest_phone="010-82176544 13466383093" rest_name="加州牛肉饭两份起送" logo="http://fuss10.elemecdn.com/3/8b/552f12c820e016539eb6aca0ad02fjpeg.jpeg" total="44"><i></i>电话退单</a>
                         </div>
            -->
                      </div>
            
                      
                      <div class="line-two">
                        <table class="table table-condensed">
                          <tbody>
                            <tr>
                              <td class="col1"><span class="item-name">下单时间:</span><span class='om_time'><s:date name="#l.addTime" format="yyyy年MM月dd日 HH:mm"/></span><!-- <span class="item-name">订单号:</span> 12428409764321312--></td>
                              <td class="col2"><span class="item-name">餐厅电话: <s:property value="#l.restaurant.phone"/></span></td>
                               <td class="col2"><span class="item-name">餐厅电话: <s:property value="#l.restaurant.phone2"/> </span></td>
                            </tr>
                            <!-- 
                            <tr>
                              <td class="col1"><span class="item-name">送餐地址:</span> <s:property value="#l.address"/> </td>
                              <td class="col2"><span class="item-name">联系电话:</span> <s:property value="#l.phone"/> </td>
                              <td class="col3"><span class="item-name">备用电话:</span> <s:property value="#l.back_phone"/> </td>
                            </tr>
                             -->
                          </tbody>
                        </table>
                      </div>
                    </div>
                    
                    <div class="order-table-wrapper">
                           <table class="order-table table table-striped">
                            <thead>
                              <tr>
                                <th class="col-name">美食篮子</th>
                                <th class="col-rating"></th>
                                <th class="col-price">单价</th>
                                <th class="col-quantity">数量</th>
                                <th class="col-sub-total">小计</th>
                              </tr>
                            </thead>
            				<s:if test="#l.menuList!=null">
                            <tbody>
                            <s:iterator id="ml" value="%{#l.menuList}">
                               <tr>
                                    <td class="col-name">
                                      <span><s:property value="#ml.menuName"/></span>
                                    </td>
                                    <td class="col-rating">
                                                                                             该状态下不能点评
            
                                    </td>
                                    <td class="col-price">￥<s:property value="#ml.priceShow"/></td>
                                    <td class="col-quantity"><s:property value="#ml.copies"/></td>
                                    <td class="col-sub-total">￥<s:property value="#ml.totalPriceShow"/></td>
                                </tr>
            				</s:iterator>
            				</tbody>
                            </s:if>
                          </table>
                          <!-- 
                          <table class="order-table table table-striped">
                            <thead>
                              <tr>
                                <th class="col-name">其他费用</th>
                                <th class="col-rating"></th>
                                <th class="col-price">单价</th>
                                <th class="col-quantity">数量</th>
                                <th class="col-sub-total">小计</th>
                              </tr>
                            </thead>
                            <tbody>
                                              </tbody>
                          </table>
                        -->
                        <table class="order-table total-table table table-striped">
                          <tfoot>
                            <tr>
                              <td class="col-name">合计</td>
                              <td class="col-rating"></td>
                              <td class="col-price"></td>
                              <td class="col-quantity"><s:property value="#l.totalCopies"/></td>
                              <td class="col-sub-total">￥<s:property value="#l.totalPriceShow"/></td>
                            </tr>
                          </tfoot>
                        </table>
                    </div>
            
                  </div>
               </s:iterator>
               <wm:pages value="%{pageList.pages}"/>
						</s:else>
						</div>

						<div class="food-orders" id="day1" style="display:none">
						<s:if test="pageList==null||pageList.objectList==null||pageList.objectList.size==0">
							<p class="empty">
								你还没有下过单哦，现在就去订餐吧～
							</p>
						</s:if>
						<s:else>
						<s:iterator id="l" value="%{pageList.ObjectList}">
             	 <span id="ref_time" ref_time='1364954294000'></span>
                     <div class="order-block">
            
                     <div class="order-header">
                      <div class="status-wrapper">
                        <div class="status orange">
                        <!-- 
                          <s:if test="#l.state==0">下单</s:if>
                          <s:if test="#l.state==1">饭店接单</s:if>
                          <s:if test="#l.state==2">送出</s:if>
                          <s:if test="#l.state==3">交易成功</s:if>
                          @ -->
                          <a href="/hd-jznrmdw" target="_blank"><s:property value="#l.resName"/></a>
                        </div>
            
            <!-- 
                        <div class="order-actions">
                                      <a class="btn-cancel cancel_order_by_phone" order_sn="12428409764321312" rest_phone="010-82176544 13466383093" rest_name="加州牛肉饭两份起送" logo="http://fuss10.elemecdn.com/3/8b/552f12c820e016539eb6aca0ad02fjpeg.jpeg" total="44"><i></i>电话退单</a>
                         </div>
            -->
                      </div>
            
                      
                      <div class="line-two">
                        <table class="table table-condensed">
                          <tbody>
                            <tr>
                              <td class="col1"><span class="item-name">下单时间:</span><span class='om_time'><s:date name="#l.addTime" format="yyyy年MM月dd日 HH:mm"/></span><!-- <span class="item-name">订单号:</span> 12428409764321312--></td>
                              <td class="col2"><span class="item-name">餐厅电话: <s:property value="#l.restaurant.phone"/></span></td>
                               <td class="col2"><span class="item-name">餐厅电话: <s:property value="#l.restaurant.phone2"/> </span></td>
                            </tr>
                            <tr>
                              <td class="col1"><span class="item-name">送餐地址:</span> <s:property value="#l.address"/> </td>
                              <td class="col2"><span class="item-name">联系电话:</span> <s:property value="#l.phone"/> </td>
                              <td class="col3"><span class="item-name">备用电话:</span> <s:property value="#l.back_phone"/> </td>
                            </tr>
                            
                          </tbody>
                        </table>
                      </div>
                    </div>
                    
                    <div class="order-table-wrapper">
                           <table class="order-table table table-striped">
                            <thead>
                              <tr>
                                <th class="col-name">美食篮子</th>
                                <th class="col-rating"></th>
                                <th class="col-price">单价</th>
                                <th class="col-quantity">数量</th>
                                <th class="col-sub-total">小计</th>
                              </tr>
                            </thead>
            				<s:if test="#l.menuList!=null">
                            <tbody>
                            <s:iterator id="ml" value="%{#l.menuList}">
                               <tr>
                                    <td class="col-name">
                                      <span><s:property value="#ml.menuName"/></span>
                                    </td>
                                    <td class="col-rating">
                                                                                             该状态下不能点评
            
                                    </td>
                                    <td class="col-price">￥<s:property value="#ml.priceShow"/></td>
                                    <td class="col-quantity"><s:property value="#ml.copies"/></td>
                                    <td class="col-sub-total">￥<s:property value="#ml.totalPriceShow"/></td>
                                </tr>
            				</s:iterator>
            				</tbody>
                            </s:if>
                          </table>
                          <!-- 
                          <table class="order-table table table-striped">
                            <thead>
                              <tr>
                                <th class="col-name">其他费用</th>
                                <th class="col-rating"></th>
                                <th class="col-price">单价</th>
                                <th class="col-quantity">数量</th>
                                <th class="col-sub-total">小计</th>
                              </tr>
                            </thead>
                            <tbody>
                                              </tbody>
                          </table>
                        -->
                        <table class="order-table total-table table table-striped">
                          <tfoot>
                            <tr>
                              <td class="col-name">合计</td>
                              <td class="col-rating"></td>
                              <td class="col-price"></td>
                              <td class="col-quantity"><s:property value="#l.totalCopies"/></td>
                              <td class="col-sub-total">￥<s:property value="#l.totalPriceShow"/></td>
                            </tr>
                          </tfoot>
                        </table>
                    </div>
            
                  </div>
               </s:iterator>
               <wm:pages value="%{pageList.pages}"/>
						</s:else>
						</div>

					</div>
				</div> 
			</div>
		</div>
	</div>

	
<!--   /content  -->
  <s:action name="foot" executeResult="true"></s:action>
</div>
<!--  alert div start---->
<div id="copy_dlg_restaurant"  class="restaurant-hover-dlg right hide" >
  <div class="wrapper dark_shadow">
    <div class="callout_tip"></div>
    <div class="detail"> </div>
  </div>
</div>
<!--  alert div  end ---->

<!---/body   --> 


<script src="publicui/js/jquery-1.8.3.js"></script> 
<script src="publicui/jquery-ui/js/jquery-ui-1.9.2.custom.js"></script> 
<script src="publicui/bootstrap/js/bootstrap.min.js"></script> 
<script src="js/head.js"></script> 
<script type="text/javascript">
function show(type){
	if(type==0){
		$('#day1').css("display","none");
		$('#day').css("display","");
		$('#li').addClass("active");
		$('#li1').removeClass("active");
	}else{
		$('#day').css("display","none");
		$('#day1').css("display","");
		$('#li1').addClass("active");
		$('#li').removeClass("active");
	}
}
</script>

</body> 
</html>
